home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 October / EnigmA AMIGA RUN 31 (1998)(G.R. Edizioni)(IT)[!][issue 1998-10].iso / earkit / chat / amirc_20 / install_amirc < prev    next >
Text File  |  1998-09-22  |  33KB  |  805 lines

  1. ;******************************************************************************
  2. ;        ____           ______ ______  ______
  3. ;       / __ \         /_  __// __  / / __  /
  4. ;      / /_/ /_   _     / /  / /_/ / / /  -'
  5. ;     / __  // \_/ \   / /  /   __/ / /
  6. ;    / / / // /__/ /__/ /_ / /\ \  / /___
  7. ;   /_/ /_//_/  /_//_____//_/  \_\ \____/
  8. ;
  9. ; $VER: AmIRC_Installer 1.51Lame (12-January-1998) 
  10. ; AmIRC ©1995,1996,1997,1998 by Oliver Wagner
  11. ; AmIRC Installer by Robert C. Reiswig ©1995,1996,1997,1998 
  12. ;
  13. ; If you wish to use any part of this installer you must ask. May not be 
  14. ; integrated/placed into any other package. Changes, suggestions or problems:
  15. ; AmIRC@vgr.com or vgr@best.com
  16. ;******************************************************************************
  17.  
  18. ;*** System Stuff ***
  19. (set cpu (database "cpu"))  (set vblank (database "vblank"))
  20. (set graphmem (database "graphics-mem")) (set totmem (database "total-mem"))
  21. (set osver (/ (getversion "LIBS:version.library") 65536))
  22. (if (= vblank "60") ((set blank "NTSC")) ((set blank "PAL")))
  23. (set fastmem (- totmem graphmem))
  24.  
  25. (if (= osver 37) (set workbench "2.0")) (if (= osver 38) (set workbench "2.1"))
  26. (if (= osver 39) (set workbench "3.0")) (if (= osver 40) (set workbench "3.1"))
  27. (if (= osver 41) (set workbench "4.0")) 
  28.  
  29. (set cpu (database "cpu"))
  30. (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 1))
  31. (if (= cpu 68020) (set #cpu 2)) (if (= cpu 68030) (set #cpu 3))
  32. (if (= cpu 68040) (set #cpu 4)) 
  33. (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 5) )
  34.  
  35. (set vernum1 (getversion "AmIRC"))
  36. (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  37. (set AmIRCver (cat ver1 "." rev1))
  38.  
  39. (if (> (exists ("env:Language")) 0) (set lanfound (getenv "Language")) )
  40. (set lan 0)
  41.  
  42. (if (= "english" lanfound) (set lan 0))  (if (= "deutsch"  lanfound) (set lan 1))
  43. (if (= "français" lanfound) (set lan 2)) (if (= "Español" lanfound) (set lan 3))
  44. (if (= "Svenska" lanfound) (set lan 4))  (if (= "nederlands" lanfound) (set lan 5))
  45. (if (= "italiano" lanfound) (set lan 6)) (if (= "norsk"  lanfound) (set lan 7))
  46. (if (= "português" lanfound) (set lan 8))
  47.  
  48. (set #English    "English")  (set #Deutsch    "Deutsch")
  49. (set #Français   "Français") (set #Español    "Español")
  50. (set #Svenska    "Svenska")  (set #Nederlands "Nederlands")
  51. (set #Italiano   "Italiano") (set #Norsk      "Norsk")    
  52. (set #Português  "Português")
  53.  
  54. (set mfound 0) (set newicon1 1) 
  55. (set keeper 1) (set firsttime 0)
  56.  
  57. ;********************************************************************
  58. ; English Strings
  59. ;********************************************************************
  60. (set #about (cat "\n\nWelcome to AmIRC " AmIRCver "\n\nCopyright © 1995-1998 by\n\nOliver Wagner\n<owagner@vapor.com>\n\nhttp://www.vapor.com/amirc/\nftp://ftp.vapor.com/pub/amirc/") )
  61. (set #nomui (cat "\n\nAmIRC uses Magic User Interface (MUI).\n\nThe installer has not found MUI: to be assigned, "
  62.                  "therefore you AmIRC will not work correctly.  You will need to install "
  63.                  "MUI before running AmIRC."
  64.             )
  65. )
  66. (set #whereAmIRC "Where do you wish to install AmIRC. A directory called 'AmIRC' will be created if one is not there. If a copy of AmIRC is found it will be backed up.")
  67. (set muiver "No Version Installed")
  68. (set #newermui "\nAmIRC needs version 3.6 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\nYou can find mui33usr.lha on Aminet in dev/gui\n\nIt looks like you have: \n\n")
  69. (set #need-os "\n\nThe 68020 version of AmIRC needs version 3.0 or higher of the Amiga OS installed to work correctly.\n\n It looks like you have: \n\n")
  70. (set #000used "\n\nThe 68000 version will be installed.") 
  71. (set #filethere1 "\n\nThe installer has found AmIRC version ")
  72. (set #filethere2 " at ")
  73. (set #filethere3 "\n\nThe file will be renamed to ")
  74. (set #filethere4 " and it will then be moved to ")
  75. (set #backuptoXXX "Back-UP to file named 'AmIRC")
  76. (set #copyover "Copy Over Old Version")
  77. (set #AmIRCfound "\nThe Installer has found a copy of AmIRC already installed. What do you want to do?\n")
  78. (set #askcpu "\nCPU Check: What CPU does the machine have that you are installing AmIRC on? The installer has found:\n")
  79. (set #newicon "\nDo you wish to copy over The AmIRC Icon from the archive? If you have any ToolTypes already set you should select no.\n")
  80. (set #nonewicon  "No  - ToolTypes already set.")
  81. (set #yesnewicon "Yes - Copy over Icon.")
  82. (set #pickicon "\nAmIRC has 3 different icons you can use choose from. Which one would you like to use?\n")
  83. (set #nomultiview (cat "The installer could not find multiview or you are running on a 2.x Amiga. "
  84.                        "The AmIRC Installer will let you choose between 3 different icon to use. Their "
  85.                        "names are:\n\n'AmIRC - Default'\n'AmIRC2 - Globe'\n'AmIRC3 - 4 Faces'\n\n"
  86.                        "You can use a picture viewer to look at the '3Icons.iff' to see the choices side-by-side, "
  87.                        "or you can just look in the drawer from where you are installing AmIRC from."
  88.                   )
  89. )
  90. (set #whatcat "Select the AmIRC Language catalog you wish to install.")
  91. (set #wherecat "\nWhere do you wish to install the AmIRC Language Catalog? Default is ")
  92. (set #catnofind "Can not find this catalog in this AmIRC archive. You may need to get the complete archive from the support site.")
  93. (set #whatdocs "\nWhat AmIRC documentation would you like to install?\n")
  94. (set #wheredocs "Where would you like the AmIRC documentation you selected to be installed?")
  95. (set #nofounddocs "\n\nThe Docs that are listed below, from the ones that you selected,  were not found in the AmIRC archive. You may need to get the complete archive from the support site.")
  96. (set #whatrexx "What AREXX Commands would you like to install? They will be placed in ")
  97. (set #notinthisarc "(* = Not found in this archive.)")
  98. (set #rexxsize1 ". There is about ")
  99. (set #rexxsize2 "K total of AREXX scripts.\n")
  100. (set #rexx1 "Away        - Away/Back script")
  101. (set #rexx2 "Finger      - AmiTCP finger script")
  102. (set #rexx3 "Leave       - Leave a channel w/msg")
  103. (set #rexx4 "WallChop    - Message all Chops on a channel")
  104. (set #rexx5 "SendBrowser - Sends URLs to Broswers")
  105. (set #rexx6 "ntalk       - Run NTalk")
  106.  
  107. (set #whatsnd "\nWhat Sounds would you like to install? They will be placed in ")
  108. (set #sndsize1 ". There is about ")
  109. (set #sndsize2 "K total of Sound files.\n")
  110. (set #snd1 " Gost Set")
  111. (set #snd2 " Sandro Set")
  112. (set #snd3 " Smkn Set")
  113.  
  114. (set #whatsub "\nWhat Submissions would you like to install? They will be placed in ")
  115. (set #subsize1 ". There is about ")
  116. (set #subsize2 "K total of Submissions files.\n")
  117. (set #sub1 " Extra Icons")
  118. (set #sub2 " Extra ARexx Scripts")
  119. (set #sub3 " Toolmanager Animbrush")
  120.  
  121. (set #oktodelete1 "\nIs it ok to delete the older AmIRC binary so that the AmIRC Directory can be made?\n")
  122. (set #oktodelete2 "\nIs it ok to delete the older _renamed_ AmIRC binary so that the AmIRC Directory can be made?\n")
  123. (set #ifyoulike (cat "\n\nIf you like AmIRC you might want to take a look at AmFTP.  It Includes the following:\n\nHigh speed asynchronous transfers for maximum efficiency, "
  124.                      "Batch download facility, Resume partially received files, FTP-Server Phonebook, Full ADT Support, Full ARexx support, Archie search engine, "
  125.                      "and much more!\n\nAmFTP can be found on Aminet in comm/tcp or\nhttp://www.vapor.com/amftp/"
  126.                 )
  127. )
  128. (set #byebye (cat "\nAmIRC Install Complete!\n\n" ))
  129.  
  130. (set #updatingmuic "\nUpdating the MUI Classes if needed.\n\n(#?.mcc & #?.mcp)")
  131. (set #newermui "\nAmIRC needs version 3.8 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\nYou can find the new MUI on Aminet in util/libs\n\nIt looks like you have: \n\n")
  132. (set #nompc "\nThe .MCC files for AmIRC can not be installed to 'mui:libs/mui'")
  133.  
  134. (set #insregstuff " Install Register information")
  135. (set #insregstuffno " Don't Install Register information")
  136. (set #installerreg "\nThe installer did not find an AmIRC key in the usual places. Do you wish to install the Register information?\n") 
  137.  
  138. (set #wheremp "\nWhere do you wish to install the MimePrefs program?\n")
  139.  
  140. ;********************************************************************
  141. ; Hello
  142. ;********************************************************************
  143. (message #about)
  144. (welcome) 
  145.  
  146. ;********************************************************************
  147. ; MUI installed?
  148. ;********************************************************************
  149. (if (< (exists "mui:") 2)  (message #nomui) )
  150.  
  151. ;********************************************************************
  152. ; Check on New installer 
  153. ;********************************************************************
  154. (set #updateinstaller "\nJust to let you know ESCOM AG has released a new version of the installer program.\n\n\nVersion 43.3 can be found on Aminet in:\n\n/util/misc/Installer-43_3.lha\n\n\nYou might want to upgrade soon, if you can. The AmIRC installer will need it. Older installers might fail.")
  155. (set InstallerVer 0)
  156. (set vernum1 @installer-version) (set ver1 (/ vernum1 65536)) 
  157. (set rev1 (- vernum1 (* ver1 65536) ) ) (set InstallerVer (cat ver1 "." rev1))
  158. (set current_installer "43.3")
  159. (if (< InstallerVer current_installer) (message #updateinstaller) )
  160.  
  161.  
  162. ;********************************************************************
  163. ; Ask where to put AmIRC & Make dir if needed
  164. ;********************************************************************
  165. (set Package (getassign "AmiTCP"))
  166. (if (= Package "") (set Package (getassign "Inet")) )
  167.  
  168. (set AmIRCdir  (askdir (prompt #whereAmIRC)
  169.                (help   #whereAmIRC)
  170.                     (default Package)
  171.                )  
  172. )
  173.  
  174. (set where AmIRCdir)
  175.  
  176. (if (= 1 (exists (tackon where "AmIRC") ) ) 
  177.   (
  178.     (set vernum1 (getversion (tackon where "AmIRC") ))
  179.     (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  180.     (set AmIRC_old (cat ver1 "." rev1))
  181.  
  182.     (message (cat #filethere1 ver1 "." rev1 #filethere2 where #filethere3 
  183.                   (cat "AmIRC" AmIRC_old) #filethere4 (tackon AmIRCdir "AmIRC") )
  184.     )
  185.     
  186.  
  187.     (copyfiles (source (tackon where "AmIRC"))
  188.                (dest where) 
  189.                (infos)
  190.                (newname (cat "AmIRC" AmIRC_old))
  191.     )
  192.     
  193.     (delete (tackon AmIRCdir "AmIRC") (prompt #oktodelete1) (help #oktodelete1) (confirm) (infos)) 
  194.     
  195.  
  196.     (if (< (exists (tackon AmIRCdir "AmIRC")) 2) (makedir (tackon AmIRCdir "AmIRC") (infos)) )    
  197.  
  198.     (copyfiles (source (tackon where (cat "AmIRC" AmIRC_old) ))
  199.                        (dest (tackon AmIRCdir "AmIRC")) 
  200.                        (infos)
  201.                
  202.     )
  203.  
  204.     (delete (tackon where (cat "AmIRC" AmIRC_old)) (prompt #oktodelete2) (help #oktodelete2) (confirm) (infos) ) 
  205.  
  206.     ;(set firsttime 1)
  207.  
  208.   )
  209. )
  210.  
  211. (if (< (exists (tackon AmIRCdir "AmIRC")) 2) (makedir (tackon AmIRCdir "AmIRC") (infos)) )
  212.  
  213. (if (exists "/AmIRC_20.info")
  214.  (copyfiles (source "/AmIRC_20.info") (dest (tackon "/" where)) (newname "AmIRC.info") (optional "nofail") ) 
  215. )
  216.  
  217. (set where (tackon AmIRCdir "AmIRC"))
  218. (set @default-dest where)
  219.  
  220. ;********************************************************************
  221. ; Double Check on the CPU
  222. ;********************************************************************
  223. (set cpuPick (askchoice (choices "68000" "68010" "68020" "68030"
  224.                          "68040" "68060"
  225.                 )
  226.              (prompt #askcpu)
  227.                      (help   #askcpu)
  228.                    (default #cpu)
  229.       )
  230. )
  231.  
  232. ;********************************************************************
  233. ; Check for AmIRC020 requs
  234. ;********************************************************************
  235. (set ver 0)
  236. (if (exists "mui:mui") 
  237.  (
  238.   (set vernum (getversion "mui:mui") )
  239.   (set ver (/ vernum 65536)) (set rev (- vernum (* ver 65536) ) )
  240.  
  241.   (if (= ver 7) (set muiver "2.0") )   (if (= ver 8) (set muiver "2.1") )
  242.   (if (= ver 9) (set muiver "2.2") )   (if (= ver 10) (set muiver "2.3") )
  243.   (if (= ver 11) (set muiver "3.0") )  (if (= ver 12) (set muiver "3.1") )
  244.   (if (= ver 13) (set muiver "3.2") )  (if (= ver 14) (set muiver "3.3") )
  245.   (if (= ver 15) (set muiver "3.4") )  (if (= ver 16) (set muiver "3.5") )
  246.   (if (= ver 17) (set muiver "3.6") )  (if (= ver 18) (set muiver "3.7") )
  247.   (if (= ver 19) (set muiver "3.8") )  (if (= ver 20) (set muiver "3.9") )
  248.   (if (= ver 21) (set muiver "4.0") )  (if (= ver 22) (set muiver "4.1") )
  249.  )
  250. )
  251.  
  252. (if (< ver 17)   ( (message (cat #newermui muiver))   (set cpuPick 0) ))
  253. (if (< osver 39) ( (message (cat #need-os workbench #000used)) (set cpuPick 0) ))
  254.  
  255. ;********************************************************************
  256. ; Check for old & backup
  257. ;********************************************************************
  258. (if (exists (tackon where "AmIRC")) 
  259.   (
  260.       (set vernum1 (getversion (tackon where "AmIRC") ))
  261.       (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  262.       (set AmIRC_old (cat ver1 "." rev1))
  263.  
  264.       (set keeper  (askchoice (choices  (cat #backuptoXXX AmIRC_old "'")  #copyover)
  265.                      (prompt #AmIRCfound)
  266.                  (help   #AmIRCfound)
  267.                      (default 0)
  268.                )
  269.       )    
  270.  
  271.  
  272.       (if (= keeper 0)
  273.          (copyfiles (source (tackon where "AmIRC"))
  274.                      (dest where) 
  275.                      (infos)
  276.                      (newname (cat "AmIRC" AmIRC_old))
  277.          )
  278.       )          
  279.  
  280.       (set firsttime 1)
  281.     
  282.   )
  283. )
  284.  
  285. ;********************************************************************
  286. ; Copy over correct AmIRC and Icon if wanted
  287. ;********************************************************************
  288. (if ( > cpuPick 1)
  289.    (copyfiles (source "AmIRC020") (dest where) (optional "nofail") (newname "AmIRC") )
  290.  
  291.    (copyfiles (source "AmIRC") (dest where) (optional "nofail") )
  292. )
  293.  
  294. (if (= firsttime 0)  (copyfiles (source "AmIRC.info") (dest where) (optional "nofail") ) )
  295.  
  296.  
  297. (if (= keeper 0) 
  298.   (
  299.    (set newicon (askchoice (choices #yesnewicon #nonewicon)
  300.                            (prompt #newicon)
  301.                        (help   #newicon)
  302.                            (default 0)
  303.             )
  304.    )
  305.   
  306.    (if (= newicon 0) 
  307.      (copyfiles (source "AmIRC.info") (dest where)  (optional "nofail") )
  308.    )
  309.  
  310.   )
  311. )
  312.  
  313. (if (exists ("RegisterAmIRC"))
  314.  (copyfiles (source "RegisterAmIRC") (dest where)  (infos) (optional "nofail") )
  315. )
  316.  
  317. ;********************************************************************
  318. ; Copy MimePrefs
  319. ;********************************************************************
  320. (if (exists "MimePrefs")  
  321.  (
  322.   (if (exists "sys:prefs/MimePrefs" (noreq)) (set mpguess 1) (set mpguess 0))
  323.  
  324.   (set wheremp  (askchoice (choices where "SYS:Prefs")
  325.                            (prompt (cat #wheremp "\n"))
  326.                       (help   #wheremp)
  327.                         (default mpguess)
  328.                 )  
  329.   )
  330.  
  331.   (if (= wheremp 0) (set destmp where) (set destmp "SYS:Prefs"))
  332.  
  333.   (if (= (exists (tackon destmp "MimePrefs.info")) 0)  
  334.    (copylib (source "MimePrefs") (dest destmp) (infos) (optional "nofail") ) 
  335.    (copylib (source "MimePrefs") (dest destmp) (optional "nofail") ) 
  336.   )
  337.  
  338.  )
  339. )
  340.  
  341. ;********************************************************************
  342. ; Select and copy over AmIRC Catalog
  343. ;********************************************************************
  344. (if (> (exists "catalogs") 0) 
  345. (
  346. (set XX 0) (set lan 0)
  347. (foreach "Catalogs" "#?"
  348.  (
  349.   (set XX (+ XX 1)) 
  350.   (textfile (dest (cat "ENV:i.høld." XX)) (append @each-name) ) 
  351.   (if (= lanfound @each-name) (set lan XX))
  352.  
  353.   (if (OR (= (patmatch "#?.c#?" @each-name) 1)  (= (patmatch "#?.read#?" @each-name) 1)) 
  354.      ( (delete (cat "ENV:i.høld." XX)) (set XX (- XX 1))  )
  355.   )
  356.  
  357.  )
  358. )
  359.  
  360. (set l1 "N/A") (set l2 "N/A") (set l3 "N/A") (set l4 "N/A") (set l5 "N/A")
  361. (set l6 "N/A") (set l7 "N/A") (set l8 "N/A") (set l9 "N/A") (set l10 "N/A")
  362. (set l11 "N/A") (set l12 "N/A") (set l13 "N/A") (set l14 "N/A") (set l15 "N/A") 
  363.  
  364. (set l0 "English")
  365. (if (> (exists ("ENV:i.høld.1")) 0)   (set l1 (getenv "ENV:i.høld.1")) ) (if (> (exists ("ENV:i.høld.2")) 0)   (set l2 (getenv "ENV:i.høld.2")) )
  366. (if (> (exists ("ENV:i.høld.3")) 0)   (set l3 (getenv "ENV:i.høld.3")) ) (if (> (exists ("ENV:i.høld.4")) 0)   (set l4 (getenv "ENV:i.høld.4")) )
  367. (if (> (exists ("ENV:i.høld.5")) 0)   (set l5 (getenv "ENV:i.høld.5")) ) (if (> (exists ("ENV:i.høld.6")) 0)   (set l6 (getenv "ENV:i.høld.6")) )
  368. (if (> (exists ("ENV:i.høld.7")) 0)   (set l7 (getenv "ENV:i.høld.7")) ) (if (> (exists ("ENV:i.høld.8")) 0)   (set l8 (getenv "ENV:i.høld.8")) )
  369. (if (> (exists ("ENV:i.høld.9")) 0)   (set l9 (getenv "ENV:i.høld.9")) ) (if (> (exists ("ENV:i.høld.10")) 0) (set l10 (getenv "ENV:i.høld.10")) )
  370. (if (> (exists ("ENV:i.høld.11")) 0) (set l11 (getenv "ENV:i.høld.11")) )(if (> (exists ("ENV:i.høld.12")) 0) (set l12 (getenv "ENV:i.høld.12")) )
  371. (if (> (exists ("ENV:i.høld.12")) 0) (set l13 (getenv "ENV:i.høld.13")) )(if (> (exists ("ENV:i.høld.14")) 0) (set l14 (getenv "ENV:i.høld.14")) )
  372. (if (> (exists ("ENV:i.høld.15")) 0) (set l15 (getenv "ENV:i.høld.15")) )(if (> (exists ("ENV:i.høld.16")) 0) (set l15 (getenv "ENV:i.høld.16")) )
  373. (run "delete env:i.høld.#?")
  374.  
  375. (set catalog (askchoice (choices l0 l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13)            
  376.                         (prompt #whatcat)
  377.                     (help   #whatcat)
  378.                         (default lan)
  379.              )
  380. )
  381.  
  382. (if (= catalog 0)  (set #lcat l0))  
  383. (if (= catalog 1)  (set #lcat l1))  (if (= catalog 2)  (set #lcat l2))  (if (= catalog 3)  (set #lcat l3))  
  384. (if (= catalog 4)  (set #lcat l4))  (if (= catalog 5)  (set #lcat l5))  (if (= catalog 5)  (set #lcat l5))
  385. (if (= catalog 6)  (set #lcat l6))  (if (= catalog 7)  (set #lcat l7))  (if (= catalog 8)  (set #lcat l8))  
  386. (if (= catalog 9)  (set #lcat l9))  (if (= catalog 10) (set #lcat l10)) (if (= catalog 11) (set #lcat l11))
  387. (if (= catalog 12) (set #lcat l12)) (if (= catalog 13) (set #lcat l13)) (if (= catalog 14) (set #lcat l14)) 
  388. (if (= catalog 15) (set #lcat l15)) (if (= catalog 16) (set #lcat l16))
  389.  
  390.  
  391. (if (AND (<> catalog 0) (<> #lcat "N/A"))
  392.  (
  393.   (if (> (exists (cat "Catalogs/" #lcat "/amirc.catalog")) 0)
  394.     (
  395.         (set wherecat  (askchoice (choices (tackon where (cat "Catalogs/" #lcat)) (cat "Locale:Catalogs/" #lcat) )
  396.                                   (prompt (cat #wherecat (tackon where (cat "Catalogs/" #lcat)) "\n"))
  397.                             (help   #wherecat)
  398.                                (default 0)
  399.                        )  
  400.         )
  401.  
  402.       (if (= wherecat 1)
  403.         (
  404.          (if (< (exists "Locale:") 2) ( (makedir "sys:Locale") (makeassign "Locale" "sys:Locale") ) )
  405.          (if (< (exists "Locale:Catalogs") 2) (makedir "sys:Locale/Catalogs") )
  406.          (if (< (exists (cat "Locale:Catalogs/" #lcat)) 2) (makedir (cat "sys:Locale/Catalogs/" #lcat)) )
  407.          (copylib (source (cat "Catalogs/" #lcat "/amirc.catalog")) (dest (cat "sys:Locale/Catalogs/" #lcat)) )
  408.         )
  409.   
  410.         (
  411.          (if (< (exists (tackon where "Catalogs")) 2) (makedir (tackon where "Catalogs")) )
  412.          (if (< (exists (tackon where (cat "Catalogs/" #lcat)) ) 2) (makedir (tackon where (cat "Catalogs/" #lcat)) ) )
  413.          (copylib (source (cat "Catalogs/" #lcat "/amirc.catalog")) (dest (tackon where (cat "Catalogs/" #lcat)) ) (optional "nofail") )
  414.          (if (exists "Catalogs.info")
  415.            (copyfiles (source "Catalogs.info") (dest where) (optional "nofail") ) 
  416.          )
  417.         )
  418.       )
  419.  
  420.     )
  421.  
  422.     (message (cat "\nCatalogs/" #lcat "/amirc.catalog\n\n" #catnofind))
  423.   )
  424.  
  425.  )
  426. )
  427. ); End if Catalog dir
  428. ); 
  429.  
  430. ;********************************************************************
  431. ; Ask and and copy docs if wanted!
  432. ;********************************************************************
  433. (set nodocs 0)
  434.  
  435. (set docs (askoptions (choices "AmIRC.guide" "AmIRC.doc" "AmIRC.readme" "AmIRC.ps" "AmIRC.dvi" )
  436.               (prompt #whatdocs)
  437.                       (help #whatdocs)
  438.                   (default 7)
  439.       )
  440. )
  441.  
  442.  
  443.  
  444. (if (<> docs 0)
  445.  (
  446.    (set docsdir (askdir (prompt #wheredocs)
  447.                (help   #wheredocs)
  448.                     (default where)
  449.                 )  
  450.    )
  451.  
  452.    (if (> (exists "AmIRC.guide") 0) 
  453.     (if (IN docs 0) (copyfiles (source "AmIRC.guide") (dest docsdir) (infos) (optional "nofail") ) )
  454.     ( (set #nofounddocs (cat #nofounddocs "\n\nAmIRC.guide")) (set nodocs 1) )
  455.    )
  456.  
  457.    (if (> (exists "AmIRC.doc") 0) 
  458.     (if (IN docs 1) (copyfiles (source "AmIRC.doc") (dest docsdir) (infos) (optional "nofail") ) )
  459.     ( (set #nofounddocs (cat #nofounddocs "\n\nAmIRC.doc")) (set nodocs 1) )
  460.    )
  461.  
  462.    (if (> (exists "AmIRC.readme") 0) 
  463.     (if (IN docs 2) (copyfiles (source "AmIRC.readme") (dest docsdir) (infos) (optional "nofail") ) )
  464.     ( (set #nofounddocs (cat #nofounddocs "\n\nAmIRC.readme")) (set nodocs 1) )
  465.    )
  466.  
  467.    (if (> (exists "AmIRC.ps") 0) 
  468.     (if (IN docs 3) (copyfiles (source "AmIRC.ps") (dest docsdir) (infos) (optional "nofail") ) )
  469.     ( (set #nofounddocs (cat #nofounddocs "\n\nAmIRC.ps")) (set nodocs 1) )
  470.    )
  471.  
  472.    (if (> (exists "AmIRC.dvi") 0) 
  473.     (if (IN docs 4) (copyfiles (source "AmIRC.dvi") (dest docsdir) (infos) (optional "nofail") ) )
  474.     ( (set #nofounddocs (cat #nofounddocs "\n\nAmIRC.dvi")) (set nodocs 1) )
  475.    )
  476.  
  477.    ;(if (= nodocs 1) (message #nofounddocs) ) 
  478.     
  479.  
  480.  )
  481. )
  482.  
  483. ;********************************************************************
  484. ; OLD Ask and and copy AREXX stuff if wanted!
  485. ;********************************************************************
  486. ;(set size 0)
  487. ;(foreach "rexx" "#?.AMIRX"  (set size (+ size (getsize (tackon "rexx" @each-name)))) )
  488. ;(set sizek (/ size 1024))
  489.  
  490. ;(if (= (exists "rexx/away.AMIRX") 0)        (set #rexx1 (cat #rexx1 "*")) )         
  491. ;(if (= (exists "rexx/Finger.AMIRX") 0)      (set #rexx2 (cat #rexx2 "*")) )      
  492. ;(if (= (exists "rexx/Leave.AMIRX") 0)       (set #rexx3 (cat #rexx3 "*")) )       
  493. ;(if (= (exists "rexx/WallChop.AMIRX") 0)    (set #rexx4 (cat #rexx4 "*")) )    
  494. ;(if (= (exists "rexx/sendbrowser.amirx") 0) (set #rexx5 (cat #rexx5 "*")) ) 
  495. ;(if (= (exists "rexx/ntalk.amirx") 0)       (set #rexx6 (cat #rexx6 "*")) ) 
  496.  
  497. ;(set arexx (askoptions (choices #rexx1 #rexx2 #rexx3 #rexx4 #rexx5 #rexx6)
  498. ;               (prompt (cat #whatrexx (tackon where "rexx") #rexxsize1 sizek #rexxsize2 #notinthisarc) )
  499. ;                       (help (cat #whatrexx (tackon where "rexx") #rexxsize1 sizek #rexxsize2 #notinthisarc) )
  500. ;                   (default 63)
  501. ;       )
  502. ;)
  503.  
  504. ;(if (<> arexx 0)
  505. ; (
  506. ;  (set rexxdir (tackon where "rexx"))
  507. ;  (if (< (exists rexxdir) 2) (makedir rexxdir)  )
  508. ;  (if (AND (IN arexx 0) (exists "rexx/away.AMIRX"))     (copyfiles (source "rexx/away.AMIRX") (dest rexxdir) (infos) (optional "nofail") ) )
  509. ;  (if (AND (IN arexx 1) (exists "rexx/Finger.AMIRX"))    (copyfiles (source "rexx/Finger.AMIRX") (dest rexxdir) (infos) (optional "nofail") ) )
  510. ;  (if (AND (IN arexx 2) (exists "rexx/Leave.AMIRX"))    (copyfiles (source "rexx/Leave.AMIRX") (dest rexxdir) (infos) (optional "nofail") ) )
  511. ;  (if (AND (IN arexx 3) (exists "rexx/WallChop.AMIRX")) (copyfiles (source "rexx/WallChop.AMIRX") (dest rexxdir) (infos) (optional "nofail") ) )
  512. ;  (if (AND (IN arexx 4) (exists "rexx/sendbrowser.amirx")) (copyfiles (source "rexx/sendbrowser.amirx") (dest rexxdir) (infos) (optional "nofail") ) )
  513. ;  (if (AND (IN arexx 4) (exists "rexx/ntalk.amirx"))    (copyfiles (source "rexx/ntalk.amirx") (dest rexxdir) (infos) (optional "nofail") ) )
  514. ; )
  515. ;)
  516.  
  517. ;********************************************************************
  518. ; Copy AREXX stuff 
  519. ;********************************************************************
  520. (if (> (exists "Rexx") 0)
  521.  (
  522.   (if (< (exists (tackon where "Rexx")) 2) (makedir (tackon where "Rexx") (infos)) )    
  523.   (if (exists "Rexx.info")
  524.     (copyfiles (source "Rexx.info") (dest where) (optional "nofail") ) 
  525.   )
  526.  
  527.   (foreach "Rexx" "#?.AMIRX"
  528.     (copyfiles (source (tackon "Rexx" @each-name)) (dest (tackon where "Rexx")) (infos) (optional "nofail") ) 
  529.   )
  530.  
  531.  )
  532. )
  533.  
  534. ;********************************************************************
  535. ; Copy Plugins stuff 
  536. ;********************************************************************
  537. (if (> (exists "Plugins") 0)
  538.  (
  539.   (if (< (exists (tackon where "Plugins")) 2) (makedir (tackon where "Plugins") (infos)) )    
  540.   (if (exists "Plugins.info")
  541.     (copyfiles (source "Plugins.info") (dest where) (optional "nofail") ) 
  542.   )
  543.  
  544.   (foreach "Plugins" "#?.AmIPlug"
  545.     (copyfiles (source (tackon "Plugins" @each-name)) (dest (tackon where "Plugins")) (infos) (optional "nofail") ) 
  546.   )
  547.  
  548.   (foreach "Plugins" "#?_Prefs"
  549.     (copyfiles (source (tackon "Plugins" @each-name)) (dest (tackon where "Plugins")) (infos) (optional "nofail") ) 
  550.   )
  551.  
  552.  )
  553. )
  554.  
  555. ;********************************************************************
  556. ; Ask and and copy SOUND stuff if wanted!
  557. ;********************************************************************
  558. (if (> (exists "Sounds") 0)
  559.  (
  560.   (set size 0)
  561.   (foreach "Sounds" "Gost#?"  (set size (+ size (getsize (tackon "Sounds" @each-name)))) )
  562.   (set sizek-gost (/ size 1024))
  563.  
  564.   (set size 0)
  565.   (foreach "Sounds" "Sandro#?"  (set size (+ size (getsize (tackon "Sounds" @each-name)))) )
  566.   (set sizek-sandro (/ size 1024))
  567.  
  568.   (set size 0)
  569.   (foreach "Sounds" "SmKn#?"  (set size (+ size (getsize (tackon "Sounds" @each-name)))) )
  570.   (set sizek-smkn (/ size 1024))
  571.  
  572.   (set sizek (+ sizek-gost (+ sizek-sandro sizek-smkn) ) )
  573.  
  574.   (set snds (askoptions (choices (cat #snd1 " (" sizek-gost "K)")
  575.                                  (cat #snd2 " (" sizek-sandro "K)") 
  576.                                  (cat #snd3 " (" sizek-smkn "K)")
  577.                                  )
  578.                   (prompt (cat #whatsnd (tackon where "Sounds") #sndsize1 sizek #sndsize2) )
  579.                         (help (cat #whatsnd (tackon where "Sounds") #sndsize1 sizek #sndsize2) )
  580.                     (default 7)
  581.         )
  582.   )
  583.  
  584.   (if (<> snds 0)
  585.    (
  586.      (set snddir (tackon where "Sounds"))
  587.      (if (< (exists snddir) 2) (makedir snddir)  )
  588.  
  589.      (if (IN snds 0)
  590.        (foreach "Sounds" "Gost#?"
  591.           (copyfiles (source (tackon "Sounds" @each-name)) (dest snddir) (infos) (optional "nofail") ) 
  592.        )
  593.      )
  594.  
  595.      (if (IN snds 1)
  596.        (foreach "Sounds" "Sandro#?"
  597.          (copyfiles (source (tackon "Sounds" @each-name)) (dest snddir) (infos) (optional "nofail") ) 
  598.        )
  599.      )
  600.  
  601.      (if (IN snds 2)
  602.        (foreach "Sounds" "Smkn#?"
  603.          (copyfiles (source (tackon "Sounds" @each-name)) (dest snddir) (infos) (optional "nofail") ) 
  604.        )
  605.      )
  606.  
  607.    )
  608.   )
  609.  
  610.  
  611.  )
  612. )
  613.  
  614. ;********************************************************************
  615. ; Ask and and copy Submissions stuff if wanted!
  616. ;********************************************************************
  617. (if (> (exists "Submissions") 0)
  618.  (
  619.   (set size 0)
  620.   (foreach "Submissions" "#?.info"  (set size (+ size (getsize (tackon "Submissions" @each-name)))) )
  621.   (set sizek-info (/ size 1024))
  622.  
  623.   (set size 0)
  624.   (foreach "Submissions" "#?.AMIRX"  (set size (+ size (getsize (tackon "Submissions" @each-name)))) )
  625.   (set sizek-rexx (/ size 1024))
  626.  
  627.   (set size 0)
  628.   (foreach "Submissions" "#?.anmb"  (set size (+ size (getsize (tackon "Submissions" @each-name)))) )
  629.   (set sizek-tool (/ size 1024))
  630.  
  631.   (set sizek (+ sizek-info (+ sizek-rexx sizek-tool)))
  632.  
  633.  
  634.   (set sub (askoptions (choices (cat #sub1 " (" sizek-info "K)")
  635.                                 (cat #sub2 " (" sizek-rexx "K)") 
  636.                                 (cat #sub3 " (" sizek-tool "K)")
  637.                        )
  638.                   (prompt (cat #whatsub (tackon where "Submissions") #subsize1 sizek #subsize2) )
  639.                         (help (cat #whatsub (tackon where "Submissions") #subsize1 sizek #subsize2) )
  640.                     (default 7)
  641.         )
  642.   )
  643.  
  644.   (if (<> sub 0)
  645.    (
  646.      (set subdir (tackon where "Submissions"))
  647.      (if (< (exists subdir) 2) (makedir subdir)  )
  648.  
  649.      (if (IN sub 0)
  650.        (foreach "Submissions" "#?.info"
  651.           (copyfiles (source (tackon "Submissions" @each-name)) (dest subdir) (infos) (optional "nofail") ) 
  652.        )
  653.      )
  654.  
  655.      (if (IN sub 1)
  656.        (foreach "Submissions" "#?.AMIRX"
  657.           (copyfiles (source (tackon "Submissions" @each-name)) (dest subdir) (infos) (optional "nofail") ) 
  658.        )
  659.      )
  660.  
  661.      (if (IN sub 2)
  662.        (foreach "Submissions" "#?.anmb"
  663.           (copyfiles (source (tackon "Submissions" @each-name)) (dest subdir) (infos) (optional "nofail") ) 
  664.        )
  665.      )
  666.  
  667.  
  668.  
  669.  
  670.    )
  671.   )
  672.  
  673.  )
  674. )
  675.  
  676. ;********************************************************************
  677. ; Copy over #?.mpc|#?.mcc (Need to be in mui:libs/mui)
  678. ;********************************************************************
  679. (if (exists "MUI") 
  680.  (
  681.    (if (<> (getassign "mui") "")
  682.    (
  683.      (if (> (exists "mui:libs/mui") 0) 
  684.       (
  685.        (working #updatingmuic)
  686.        (foreach "mui" "#?mcp"
  687.            (copylib (source (tackon "mui" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  688.        )
  689.        (foreach "mui" "#?mcc"
  690.            (copylib (source (tackon "mui" @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  691.        )
  692.       )
  693.  
  694.       (message (cat #newermui muiver #nompc)) 
  695.      )
  696.    )
  697.    )
  698.  )
  699. )
  700.  
  701. ;********************************************************************
  702. ; Reg stuff 
  703. ;********************************************************************
  704. (procedure checkforkey
  705.  (set foundkey 0)
  706.  (if (exists "AmIRC.key" (noreq)) (set foundkey 1) )
  707.  (if (exists (tackon where "AmIRC.key") (noreq)) (set foundkey 1) )
  708.  (if (exists (tackon "s:" "AmIRC.key") (noreq)) (set foundkey 1) )
  709.  (if (exists (tackon "l:" "AmIRC.key") (noreq)) (set foundkey 1) )
  710.  (if (exists (tackon "libs:" "AmIRC.key") (noreq)) (set foundkey 1) )
  711.  (if (exists (tackon "keypath:" "AmIRC.key") (noreq)) (set foundkey 1) )
  712.  (if (exists (tackon "keyfiles:" "AmIRC.key") (noreq)) (set foundkey 1) )
  713.  
  714.  (if (= foundkey 0)
  715.   (set wantkey (askchoice  (choices #insregstuffno #insregstuff)
  716.                        (prompt #installerreg)
  717.                            (help #installerreg)
  718.                        (default 1)
  719.                )
  720.   )
  721.  
  722.   (set wantkey 0)
  723.  )
  724. )
  725.  
  726. (checkforkey)
  727.  
  728. (if (AND (exists "Register-AmIRC") (= wantkey 1))
  729.  (
  730.   (if (< (exists (tackon where "Register-AmIRC")) 2) (makedir (tackon where "Register-AmIRC") (infos)) )    
  731.   (if (exists "Register-AmIRC.info")
  732.     (copyfiles (source "Register-AmIRC.info") (dest where) (optional "nofail") ) 
  733.   )
  734.   (set whereR (tackon where "Register-AmIRC"))
  735.  
  736.  
  737.   (set whatreg  (askchoice (choices "English"  "Deutsch" "Francais" "Svenska" "Polski" "Italiano")
  738.                            (prompt "What Registration Files (Language) would you like to install?")
  739.                        (help   "What Registration Files (Language) would you like to install?")
  740.                         (default 0)
  741.                 )  
  742.   )
  743.  
  744.   (if (= whatreg 0) ((set basereg "English")  (set baseregTT "English") ) )
  745.   (if (= whatreg 1) ((set basereg "Deutsch")  (set baseregTT "Deutsch") ) )
  746.   (if (= whatreg 2) ((set basereg "Francais") (set baseregTT "French")  ) )
  747.   (if (= whatreg 3) ((set basereg "Svenska")  (set baseregTT "Svenska")  ) )
  748.   (if (= whatreg 4) ((set basereg "Polski")   (set baseregTT "Polski")  ) )
  749.   (if (= whatreg 5) ((set basereg "Italiano") (set baseregTT "Italiano")  ) )
  750.  
  751.   (if (exists "Register-AmIRC/RegistrationUtility") 
  752.     (copyfiles (source "Register-AmIRC/RegistrationUtility")
  753.                (dest whereR) 
  754.     )
  755.   )
  756.  
  757.   (if (exists (tackon "Register-AmIRC" (cat "Regtool-" basereg ".info")) )
  758.     (copyfiles (source (tackon "Register-AmIRC" (cat "Regtool-" basereg ".info")) )
  759.                (dest whereR) 
  760.                (newname "RegistrationUtility.info")
  761.     )
  762.   )
  763.  
  764.   (if (exists (tackon "Register-AmIRC" (cat "Reg_" basereg ".guide")) ) 
  765.     (copyfiles (source (tackon "Register-AmIRC" (cat "Reg_" basereg ".guide")))
  766.                (dest whereR) 
  767.                (infos)
  768.     )
  769.   )
  770.  
  771.   (if (exists (tackon "Register-AmIRC" (cat "Reg_" basereg ".doc")) )
  772.     (copyfiles (source (tackon "Register-AmIRC" (cat "Reg_" basereg ".doc")))
  773.                (dest whereR) 
  774.                (infos)
  775.     )
  776.   )
  777.  
  778.  
  779.  )
  780. )
  781.  
  782. ;********************************************************************
  783. ; copy keyfile if there 
  784. ;********************************************************************
  785. (if (> (exists "AmIRC.Key") 0)
  786.  (copyfiles (source "AmIRC.Key") (dest where) (infos) (optional "nofail") ) 
  787. )
  788.  
  789. ;********************************************************************
  790. ; Check on Setpatch 
  791. ;********************************************************************
  792. (set #updatesetpatch "\nThe installer looked for 'c:setpatch' and did not find it or you have a version lower then 40.16. AmIRC needs version 40.16 to work correctly. You wany want to upgrade soon. (NOTE: if you keep 'setpatch' in a different place than 'c:' and its 40.16 or higher then this message is void.)")
  793.  
  794. (set vernum1 (getversion "c:setpatch")) (set ver1 (/ vernum1 65536)) 
  795. (set rev1 (- vernum1 (* ver1 65536) ) ) (set setpatchver (cat ver1 "." rev1))
  796. (set current_setpatch "40.16")
  797. (if (< setpatchVer current_setpatch) (message #updatesetpatch) )
  798.  
  799.  
  800. ;********************************************************************
  801. ; AmFTP Plug and End Bye 
  802. ;********************************************************************
  803. ;(message #ifyoulike)
  804. (exit #byebye)
  805.